package com.gk.panda.apis.patrol.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.gk.panda.pojo.patrol.dto.PointDTO;
import com.gk.panda.pojo.patrol.entity.LocationInfoEntity;
import lombok.Data;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @Author：xxz
 * @Create: 2022/11/8 15:52
 */
@Mapper
public interface LocationInfoMapper extends BaseMapper<LocationInfoEntity> {
    /**
     * 获取最新一条的位置数据
     * @param patrolId
     * @return
     */
    LocationInfoEntity newLocationByPatrol(@Param("patrolId") Long patrolId);

    /**
     * 根据巡护id 查询 坐标列表
     * @param patrolId
     * @return
     */
    List<PointDTO> locationPoint(Long patrolId);
}
